home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
tvdmx.exe
/
README.DOC
< prev
next >
Wrap
Text File
|
1992-07-16
|
39KB
|
988 lines
tvDMX version 1.5 (c) 1992 Randolph Beck
=====
This is a shareware product and may be distributed and copied for free.
Users must register their copy by sending $20 to:
Randolph Beck
tvDMX Registration
P.O. Box 56-0487
Orlando, FL 32856-0487
Please include any questions or comments. Registered users will receive
a diskette with the most recent version and additional documentation.
Registered users of previous versions may upgrade to this version free.
CompuServe members may contact the author at CIS: 72361,753.
Page 1. tvDMX OVERVIEW
Keystroke Philosophy
Page 2. tvDMX CONCEPTS
The Data-Formatting Template
Page 3. USING tvDMX IN YOUR PROGRAMS
Data Windows
Automatic Assignment Constructors
Loading tvDMX Views from a Stream
Using tvDMX as Field Editors
Page 6. ADVANCED FEATURES
User Key Errors
Hidden and Read-Only Fields
Swapping Field Positions
Page 7. ASCENDANCY CHART
Page 8. UNITS
Page 9. DATA TEMPLATE CODES
Using Template Codes
Template Control Codes
Page 14. FYI
Important Virtual Methods
External Database Access
Global Functions in Units DMXGIZMA and tvGIZMA
Page 17. USER RESPONSE FORM
tvDMX OVERVIEW Page 1
==============
This project was originally undertaken to enable programmers to quickly
design a browse-like data entry screen which users could operate in a
natural and intuitive way. It was completely redesigned for Turbo Vision.
The object-oriented framework of tvDMX can be extended to access any form
of data structure (including dBASE files and Streams and Collections).
tvDMX display formats use picture templates and grant the programmer full
control over the appearance of each field.
Features:
* programmable display formats for the major Pascal data types
* containment within a Turbo Vision scrolling view
* virtual methods provide maximum flexibility
* record structure and display format can be set at run-time
* hidden and read-only fields
* field display position order can differ from physical order
* reports can be generated for the data in views
This document should give a quick introduction to tvDMX. Rather than
detail the inner workings, I decided to provide four sample programs
which you can examine:
SAMPLES.PAS displays several windows: Each with data in various formats.
Most of the scrolling data windows has an accompanying dialog window
which can be selected by pressing the <F2> key. This will give you an
idea of what tvDMX can do.
WORKSHOP.PAS is intended for your own experiments. It will give you an
idea of how easy it is to create a data window. WORKSHOP was written
so that you can easily modify the data structure and display formats.
FILESHOP.PAS manages data on disk via a TDosStream object --to show that
tvDMX operations are not limited to data in RAM.
DLGSHOP.PAS demonstrates how to integrate a tvDMX view into a dialog box.
COLLECTR.PAS demonstrates how to manage data in a collection.
The source code for each of these programs contains additional information
about its use and features.
Keystroke Philosophy
--------------------
Most keys work as you would expect. In addition: kbCtrlT deletes the
current field, and kbCtrlY deletes the current record.
The kbLeft and kbRight keys normally move the field pointer from one
field to another. Movement within a character field is permitted:
1) After a character is entered into the field;
2) after kbIns, kbCtrlT or kbCtrlY is pressed; or
3) anytime the keyboard is not in INSERT mode.
tvDMX CONCEPTS Page 2
==============
The Data-Formatting Template
----------------------------
The default appearance of these views is usually column/row oriented.
You declare a record structure for the DMX initialization procedure in
a template string --which also determines the display format.
(You will see later how tvDMX can be used for field editors.)
A RECORD of STRING [20], INTEGER, and REAL may use this format:
' ssssssssssssssssssss | iiii | ($rrr,rrr.rr) '
And that would present a record in this way:
' Daniel D. Demo │ 154 │ $ 12,056.55 '
The template string in this example was entirely in lower case. If in
upper case, character-fields would be entered in upper case and
numeric-fields would be restricted to positive values.
The data TYPE of each field is determined by the characters in the string.
All primary Pascal data types are supported: BOOLEAN, BYTE, SHORTINT,
INTEGER, LONGINT, WORD, STRING, CHAR, arrays of CHAR, and REAL. The
programmer only needs to alter this one template string when changing the
data structure. (Template codes are listed on the Reference page.)
You can switch to SINGLE, DOUBLE or EXTENDED reals by changing TYPE
TREALNUM in RSET.PAS.
A backslash ('\') may be used as a field delimiter, and is displayed as a
space character. (Other delimiters can be devised as well --please refer
to the ^D control code.)
The tilde ('~') character can be used to switch format-processing on and
off. This makes it possible to separate the text-literals from format and
control codes:
' ~Name:~ ssssssssssssssssssss\ ~SSN:~ ###-##-#### '
This is diplayed as:
' Name: Daniel D. Demo SSN: 012-34-5678 '
USING tvDMX IN YOUR PROGRAMS Page 3
============================
Data Windows
------------
Presumably you understand that a focused TScroller is owned by, and
operates within, an active TWindow. The TScroller also has several
peer-views: a TFrame and two TScrollBars. If you wished, you could add
more views to display additional information. This is how the
TDmxScroller object works, as well as its descendant TDmxEditor.
(A TDmxScroller object displays data in a scrolling window, and a
TDmxEditor object adds the ability to edit the data.)
Programmers can instantiate a TWindow view and insert a TDmxEditor object
just like using TScroller --with a few extra parameters. Then, for an
effective data window, field titles should be placed at the top, and a
record number indicator should be placed below.
The TDmxWindow object (a descendant of TWindow) coordinates the entire
process of inserting these extra views.
Initialization Syntax:
constructor TDmxWindow.Init (
var Bounds : TRect;
ATitle : TTitleStr;
ANumber : Integer;
ATemplate : String;
var AData;
BSize : LongInt;
var ALabels